from pms.common.views import PostFormula
from project.utils.role import project_role_view
from project.models import ProjectRole


class API(PostFormula):
    def handle(self, req):
        rid = req['rid']
        return self.success_respond(project_role_view(
            project_role=ProjectRole.objects.get(id=rid)
        ))
